<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>网页资源嗅探器</title>
  <style>
    body {
      width: 600px;
      height: 400px;
      margin: 0;
      font-family: Arial, sans-serif;
    }

    .container {
      height: 100%;
      display: flex;
      flex-direction: column;
    }

    .header {
      padding: 15px;
      background-color: #f0f0f0;
      border-bottom: 1px solid #ddd;
    }

    .header h1 {
      margin: 0;
      font-size: 18px;
    }

    .tabs {
      display: flex;
      background-color: #f8f8f8;
      border-bottom: 1px solid #ddd;
    }

    .tab {
      padding: 10px 20px;
      cursor: pointer;
      border: none;
      background: none;
      font-size: 14px;
    }

    .tab.active {
      background-color: #fff;
      border-bottom: 2px solid #1a73e8;
      color: #1a73e8;
    }

    .content {
      flex: 1;
      overflow-y: auto;
      padding: 15px;
    }

    .resource-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 15px;
      display: none;
    }

    .resource-list.active {
      display: grid;
    }

    .resource-item {
      border: 1px solid #ddd;
      border-radius: 4px;
      padding: 10px;
      text-align: center;
    }

    .resource-item img {
      max-width: 100%;
      height: auto;
    }

    .resource-item video,
    .resource-item audio {
      max-width: 100%;
    }

    .download-btn {
      margin-top: 8px;
      padding: 5px 10px;
      background-color: #1a73e8;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }

    .download-btn:hover {
      background-color: #1557b0;
    }

    .no-resources {
      text-align: center;
      padding: 20px;
      color: #666;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="header">
      <h1>网页资源嗅探器</h1>
    </div>
    <div class="tabs">
      <button class="tab active" data-type="images">图片</button>
      <button class="tab" data-type="videos">视频</button>
      <button class="tab" data-type="audios">音频</button>
    </div>
    <div class="content">
      <div class="resource-list active" id="images-list"></div>
      <div class="resource-list" id="videos-list"></div>
      <div class="resource-list" id="audios-list"></div>
    </div>
  </div>
  <script src="popup.js"></script>
</body>
</html>